package heven.holt.library.extensions

import com.liaoinstan.springview.container.DefaultHeader
import com.liaoinstan.springview.widget.SpringView

fun SpringView.registerHeader(onRefreshListener: () -> Unit) {
    header = DefaultHeader(context)
    setListener(object : SpringView.OnFreshListener {
        override fun onRefresh() {
            onRefreshListener.invoke()
        }

        override fun onLoadmore() {
        }
    })
}